import React from 'react';
import ReactDOM from 'react-dom';
import 'antd/dist/antd.css';
import './index.css';
import App from './App';
import { registerMicroApps, start } from 'qiankun';

ReactDOM.render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
  document.getElementById('root')
);

registerMicroApps([
  {
    name: 'angular7-hash',
    entry: '//localhost:7100',
    container: '#container',
    activeRule: '/app-angular7-hash',
  },
  {
    name: 'angular7-history',
    entry: '//localhost:7200',
    container: '#container',
    activeRule: '/app-angular7-history',
  },
  {
    name: 'angular9-hash',
    entry: '//localhost:7300',
    container: '#container',
    activeRule: '/app-angular9-hash',
  },
  {
    name: 'angular9-history',
    entry: '//localhost:7400',
    container: '#container',
    activeRule: '/app-angular9-history',
  },
  {
    name: 'jquery',
    entry: '//localhost:7500',
    container: '#container',
    activeRule: '/app-jquery',
  },
  {
    name: 'react16-hash',
    entry: '//localhost:7600',
    container: '#container',
    activeRule: '/app-react16-hash',
  },
  {
    name: 'react16-history',
    entry: '//localhost:7700',
    container: '#container',
    activeRule: '/app-react16-history',
  },
  {
    name: 'vue2-hash',
    entry: '//localhost:7800',
    container: '#container',
    activeRule: '/app-vue2-hash',
  },
  {
    name: 'vue2-history',
    entry: '//localhost:7900',
    container: '#container',
    activeRule: '/app-vue2-history',
  },
  {
    name: 'vue3-hash',
    entry: '//localhost:8100',
    container: '#container',
    activeRule: '/app-vue3-hash',
  },
  {
    name: 'vue3-history',
    entry: '//localhost:8200',
    container: '#container',
    activeRule: '/app-vue3-history',
  },
]);
// 启动 qiankun
start();